package cn.juque.datapipeline.vo.taskgroupinfo;

import cn.juque.datapipeline.vo.BaseVO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>任务组信息</li>
 * </ul>
 * @date 2023-04-02 14:23:40
 **/
@Data
public class TaskGroupInfoUpdateVO extends BaseVO {

    /**
     * 主键
     */
    @NotEmpty(message = "主键不能为空")
    @Size(message = "主键不能超过{max}个字符", max = 32)
    private String id;

    /**
     * 组名称
     */
    @NotEmpty(message = "组名称不能为空")
    @Size(message = "组名称不能超过{max}个字符", max = 30)
    private String groupName;

    /**
     * 执行类型
     */
    @NotNull(message = "执行类型不能为空")
    @Range(min = 0, max = 99, message = "执行类型必须在{min}-{max}之间")
    private Integer executeType;

    /**
     * 延迟秒数
     */
    @Range(min = 1, max = 999999999, message = "执行类型必须在{min}-{max}之间")
    private Integer delaySeconds;

    /**
     * cron表达式
     */
    @Size(message = "cron表达式不能超过{max}个字符", max = 50)
    private String cron;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 400)
    private String remark;

    /**
     * 任务ID列表
     */
    @NotEmpty(message = "任务ID不能为空")
    private List<String> taskIdList;
}
